import request from '@/utils/request'

// 查询订单列表列表
export function listTord(query) {
  return request({
    url: '/system/tord/list',
    method: 'get',
    params: query
  })
}

export function listTordCom(query) {
  return request({
    url: '/system/tord/listTordCom',
    method: 'get',
    params: query
  })
}

export function getParAmount(query) {
  return request({
    url: '/system/tord/getParAmount',
    method: 'get',
    params: query
  })
}


// 查询订单列表详细
export function getTord(ordId) {
  return request({
    url: '/system/tord/info/' + ordId,
    method: 'get'
  })
}

// 新增订单列表
export function addTord(data) {
  return request({
    url: '/system/tord/add',
    method: 'post',
    data: data
  })
}

// 修改订单列表
export function updateTord(data) {
  return request({
    url: '/system/tord/update',
    method: 'put',
    data: data
  })
}

// 删除订单列表
export function delTord(ordId) {
  return request({
    url: '/system/tord/delete/' + ordId,
    method: 'delete'
  })
}

export function cancelOrd(data) {
  return request({
    url: '/pay/api/ord/cancelOrd',
    method: 'post',
    data: data
  })
}

export function refundOrd(data) {
  return request({
    url: '/pay/api/ord/refundOrd',
    method: 'post',
    data: data
  })
}

export function cancelBuyPlay(data) {
  return request({
    url: '/pay/api/ord/cancelBuyPlay',
    method: 'post',
    data: data
  })
}

export function deleteOrd(data) {
  return request({
    url: '/pay/api/ord/deleteOrd',
    method: 'post',
    data: data
  })
}


